package BinaryTree;
/**
 * 二叉树的最大深度
 */
import BinaryTree.init.TreeNode;

public class lc104 {
    public int maxDepth(TreeNode root) {
        if (root == null) return 0;
        int leftHign = maxDepth(root.left);
        int rightHign = maxDepth(root.right);
        return 1 + Math.max(leftHign, rightHign);
    }
}
